﻿Public Partial Class admin_materia
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Try
            Dim cl As New ASI_2UFG_BL.class_admin
            cl.Ingresar_materia("I", TxtCodigo.Text, Txtnombre.Text, cmbestado_aula.Text, 0)
            If cl.log = 0 Then
                Me.Lblmensajeaula.Text = "Ingresado Con exito"
                ' Me.GridView1.DataBind()
                'Me.GridView1.DataSource("SELECT [codigo], [nombre], [estado] FROM [MATERIA] ORDER BY [nombre]")
            Else
                Me.Lblmensajeaula.Text = "Error al ingresar el Registro"
            End If
        Catch ex As Exception
            MsgBox(ex, MsgBoxStyle.Critical)
        End Try


    End Sub

    Protected Sub btnagregar_Click1(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnagregar.Click
        Try
            Dim cl As New ASI_2UFG_BL.class_admin
            cl.Ingresar_materia("I", TxtCodigo.Text, Txtnombre.Text, cmbestado.SelectedValue, 0)
            If cl.log = 0 Then
                Me.Lblmensaje.Text = "Ingresado Con exito"
            Else
                Me.Lblmensaje.Text = "Error al ingresar el Registro"
            End If
        Catch ex As Exception
            MsgBox(ex, MsgBoxStyle.Critical)
        End Try
    End Sub
End Class